package com.souku.finance.application.utils;

import android.text.Editable;
import android.text.TextWatcher;

/**
 * Created by Android on 2017/1/16.
 */

public class TextWatch implements TextWatcher{

    private TextChanged textChanged;

    public TextWatch(TextChanged textChanged) {
        this.textChanged = textChanged;
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
        textChanged.change(s,start,before,count);
    }

    @Override
    public void afterTextChanged(Editable s) {

    }

    public interface TextChanged{
        void change(CharSequence s, int start, int before, int count);
    }
}
